// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 固资测算周转天数枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2024-09-27
 */
public enum InvestmentCapitalEnum {
    AR(1, "AR Days"),
    INVENTORY(2, "Inventory Days"),
    AP(3, "AP Days"),
    RECEIVABLE_AMOUNT(4, "Accounts Receivable amount"),
    INVENTORY_AMOUNT(5, "Inventory amount"),
    PAYABLE_AMOUNT(6, "Accounts Payable amount"),
    ACCOUNTS_RECEIVABLE(7, "Decrease/(Increase) to Accounts Receivable"),
    INVENTORY_DECREASE(8, "Decrease/(Increase) to Inventory"),
    ACCOUNTS_PAYABLE(9, "Increase/(Decrease) to Accounts Payable"),
    IMPACT_BETTER(10, "Net Working capital impact - Better/(Worse)"),
    CAPITALIZED_ASSETS(11, "Capitalized Assets"),
    ACCUMULATED(12, "Accumulated Depreciation"),
    NET_IMPACT(13, "Net Impact to Average Perf. Assets"),
    NET_WORKING(14, "Net working capital (increase)/decrease");

    private int value;

    private String name;

    InvestmentCapitalEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        InvestmentCapitalEnum[] arrObj = InvestmentCapitalEnum.values();
        for (InvestmentCapitalEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
